<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>测试子页面</title>
</head>
<body>
  三秒后自动关闭
</body>
<script>
    window.onload = function () {
      setTimeout(() => {
        window.close();
      }, 3000);
    }
</script>
</body>

</html>